package fr.tocchisu.grepolis.model;

import java.util.ArrayList;
import java.util.List;

public class Town {
	private final String name;
	private final Integer id;
	private final List<City> cities;

	public Town(String name, Integer id, Integer... cities) {
		this.id = id;
		this.cities = new ArrayList<City>();
		this.name = name;
		for (Integer cityId : cities) {
			this.cities.add(new City(this, cityId));
		}
	}

	public Integer getId() {
		return id;
	}

	public List<City> getCities() {
		return cities;
	}

	public String getName() {
		return name;
	}

}
